<?PHP

# Alps
#
# 
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#

$user_id = USER_ID;

$alps = new alps_class();

$x = (int) @$_REQUEST['v1'];
$y = (int) @$_REQUEST['v2'];

$alps->x = $x;
$alps->y = $y;

if (@$_REQUEST['v3'] == 'riverbuild')
{
	
	$start_x = $x;
	$start_y = $y;
	
	$alps->build_river($start_x,$start_y,'north');
	
}

$sql = "SELECT * FROM `user_alps` WHERE  `assoc_id`='$user_id'";
$alps_info = $db->return_first_result($sql);

if ($alps_info['assoc_id'] == $user_id)
{
	# User is already at the Alps
	
	if (@$_REQUEST['function'] == 'td')
	{
		echo "<pre>1 ticket used to travel</pre>";
		$x = 1;
		$y = 1;
		
		$alps->x = $x;
		$alps->y = $y;
	}
	
	$alps->display_nav();
	$alps->display_options();
}
else 
{
	# User is not already at the Alps
	$alps->deduct_ticket();
	$alps->get_there();
	$url = URL_PLAY . UID . '/alps/td/';
	header ("Location: $url");
}



?>